function main(params){
    debugger
    const self = this;
    self.$$("text_cf4cex").$$setValue(params.name);
    // 获取regionCode 或者 stallOrganizationId 两个不同时存在 存在 stallOrganizationId 时，regionCode 为null
    let regionCodeValue = params.data.columns.code;
    let stallOrganizationIdValue = params.id;

    if(stallOrganizationIdValue.startsWith('region_')) {
        stallOrganizationIdValue = null;
        if (regionCodeValue.endsWith('0')) {
            regionCodeValue = regionCodeValue.replace(/0+$/, '');
        }
    }else{
        regionCodeValue = null
        stallOrganizationIdValue = stallOrganizationIdValue.replace('stall_', '');
    }

    let filterParams = {
        regionCode: regionCodeValue,
        stallOrganizationId: stallOrganizationIdValue
    }

    filterList(self, filterParams)
}

function filterList(self, filterParams){
    let pageTableList = self.$$("page_widget_list_a8nzg3");
    if (pageTableList) {
        if (pageTableList.dataEngine && pageTableList.dataEngine.state) {
            // 给列表组件设置参数，参数名meter_id为要过滤列表中的列名，后面为参数值，取自树节点参数
            pageTableList.$children[0].$$setExtraParams({
                regionCode: filterParams.regionCode,
                stallOrganizationId: filterParams.stallOrganizationId
            })
            // 找到列表部件中的表格组件元素
            let tableComp = pageTableList.dataEngine.state.getElement("table_769qhh");
            if (tableComp) {
                //执行列表刷新
                tableComp.$$refreshData();
            }
        }
    }
}
